package com.spica.spicaschool.viewmodel

import androidx.lifecycle.LiveData
import com.spica.spicaschool.base.LiveCoroutinesViewModel
import com.spica.spicaschool.bean.SportMotionRecord
import com.spica.spicaschool.persistence.dao.SportMotionRecordDao
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject

@HiltViewModel
class SportViewModel @Inject constructor(
    private val sportMotionRecordDao: SportMotionRecordDao
) : LiveCoroutinesViewModel() {

    val sportMotionRecordLiveData: LiveData<List<SportMotionRecord>> = launchOnViewModelScope {
        sportMotionRecordDao.queryAllLiveData()
    }

}